package com.ingsha.prometheus.controller;


import com.ingsha.prometheus.entity.Result;
import com.ingsha.prometheus.entity.BrokerDto;
import com.ingsha.prometheus.service.PrometheusService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName PrometheusController
 * @Description TODO
 * @Author Martin Yi
 * @Date 2023/12/9 20:54
 * @Version 1.0
 */
@RestController
@RequestMapping("/prometheus")
@RequiredArgsConstructor
public class PrometheusController {

    private final PrometheusService prometheusService;

    @PostMapping("/update")
    public Result update(@RequestBody BrokerDto dto) {
        return prometheusService.updateData(dto);
    }

}
